# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-flask-login
pkgver=0.6.2
pkgrel=4
pkgdesc="User session management for Flask"
arch=('any')
url="https://pythonhosted.org/Flask-Login/"
license=('MIT')
depends=('python' 'python-flask' 'python-werkzeug')
makedepends=('python-setuptools')
checkdepends=('python-nose' 'python-blinker' 'python-semantic-version' 'python-asgiref')
source=("https://github.com/maxcountryman/flask-login/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('b286272ad5f7de2cfc913bee4a3eac46e4c1ce274bb12467009e1abae422f1a855aa49fd898778b8a2e937eebe9fbb387af11815267a2bc120cde943939111ec')

build() {
  cd flask-login-$pkgver
  python setup.py build
}

# Tests unsupported with flask 2.0+
# https://github.com/maxcountryman/flask-login/issues/747
# check() {
#   cd flask-login-$pkgver
#   nosetests3
# }

package() {
  cd flask-login-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
  install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}
